Skip to content

Tidied this screen#905

Open
wrightmartin wants to merge 1 commit intomasterfrom
issues/827-message-manager-improvements
Open

Tidied this screen#905
wrightmartin wants to merge 1 commit intomasterfrom
issues/827-message-manager-improvements

Conversation

@wrightmartin
Copy link
Contributor

This is WIP, please do not merge

  • Messages now split into two tables, all messages, and messages in need of moderation (need dev help to do the logic here)

 - Messages now split into two tables, all messages, and messages in need of moderation (need dev help to do the logic here)
 - Removed moderation controls (they'll be on the message screen #904)
 - Public columns are now a single column with a checkbox toggle control (need a dev to wire this up)
 - Message count now includes a # to moderate (needs wiring up by a dev)
@landscape-bot
Copy link

Code Health
Repository health decreased by 0.04% when pulling a916f87 on issues/827-message-manager-improvements into 1b8dd29 on master.

@tmtmtmtm tmtmtmtm self-assigned this Apr 13, 2015
@wrightmartin
Copy link
Contributor Author

screen shot 2015-04-13 at 16 27 31

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.66% when pulling a916f87 on issues/827-message-manager-improvements into 1b8dd29 on master.

@tmtmtmtm
Copy link
Collaborator

@wrightmartin I tried to cherry pick the checkbox part of this out as a separate change, but I'm not sure how it's meant to work. In the current version, the eye is a button, so clicking it will actually submit the form, but does changing it to a checkbox mean we're going to need to actually add a submit button beside each one as well? (Each td is basically its own separate form at the minute, so we can't even just have a single submit button without changing how the whole thing works, AFAICS)

@wrightmartin
Copy link
Contributor Author

@tmtmtmtm hmm, no, I think it would work best as it was before, the checkbox should submit. @chrismytton @duncanparkes any ideas if this is possible?

@zarino
Copy link
Collaborator

zarino commented Apr 14, 2015

@tmtmtmtm @wrightmartin A <button> without a type attribute (as the page had before) will submit the form it's part of. If you want the same from a checkbox, you'll need to do it with javascript, and provide an actual submit button too as a fallback for non-javascript situations, like:

<form>
  <input type="checkbox">
  <button type="submit">Save</button>
</form>
<script>
  $(function(){
    $(':checkbox').on('change', function(){
      $(this).parents('form').submit();
    }).siblings('button').hide();
  });
</script>

Or something.

@tmtmtmtm
Copy link
Collaborator

I talked to Chris about this on the train this morning, and the best we could come up with that would actually still work plausibly well without JS was to have the default version be the button (as the current live version), and have the JS replace that with the checkbox, that it then also traps and auto-submits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants